<%@page	import="java.util.ArrayList,com.alibaba.dubbo.demo.bean.SysRole"%> 
<%@page	import="com.point.community.bean.dwzPageData"%>
<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%@page import="java.lang.Integer"%>
<%@page import="java.lang.String"%>
<script src="js/buildtree.js" type="text/javascript"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
	 dwzPageData dwzData;
     if(request.getSession().getAttribute("sysRoleDwzData")!=null)
     	dwzData =(dwzPageData)request.getSession().getAttribute("sysRoleDwzData"); 
     else
     	dwzData = new dwzPageData();
%>
<div class="pageContent" id="roleinfopageContent">
	<div id="roleinfolef" class="unitBox" style="float:left; display:block; overflow:auto; width:700px;border-left:1px #B8D0D6 solid;">
			<div class="pageHeader">
		    <form id="pagerForm" rel="pagerForm" onsubmit="return navTabSearch(this);" action="webQueryAllSysRole" method="post">
		        <input type="hidden" name="pageNum" value="<%=dwzData.currentPage%>" />
		        <input type="hidden" name="numPerPage" value="<%=dwzData.numPerPage%>" />  
		        <input type="hidden" name="method" value="page" />
		        <div class="searchBar">
		            <table class="searchContent">
						<tr>
							<td>角色编号：<input type="text" size='20px' name="rolecode"
								value="<s:property value="#session.rolecode" />" />
							</td>
							<td>角色名称：<input type="text" name="rolename"
								value="<s:property value="#session.rolename" />" />
							</td>
							<td>
									<div class="buttonActive">
									<div class="buttonContent">
										<button type="submit">检索</button>
									</div>
								</div>
							</td>		
						</tr>
					</table>
					
		        </div>
		    </form>
		</div>
		<div class="pageContent">
		    <div class="panelBar">
		        <ul class="toolBar">
		            <li><a class="add" href="roleinfoupdate.jsp?action=add" target="dialog" rel="roleinfoedit" mask="true"  fresh="true" maxable="false"  ><span>添加新角色</span></a></li>
		            <li class="line">line</li>
		        </ul>
		    </div>
		    <table class="table" layoutH="108">
				<thead>
					<tr>
						<th width="40">序号</th>
						<th width="80">角色编号</th>
						<th width="120">角色名称</th>
						<th width="180">权限部门</th>
						<th width="80">备注</th>
						<th width="180">操作</th>
					</tr>
				</thead>
				<tbody>
					<% 
						int nIndex = 1;
					%>
					<s:iterator value="#session.sysRoleList" status="m">
						<tr target="sid_user" rel="<s:property value="roleid" />">
							<td><%=nIndex %></td> 
							<% 
								nIndex ++;
							%>
							<td><s:property value="rolecode" /></td>
							<td><s:property value="rolename" /></td> 
							<td><s:property value="deptright" /></td>
							<td><s:property value="remark" /></td>
							<td>
							<a class="edit" href="./queryOneSysRole?roleid=<s:property value="roleid"/>&action=edit"  target="dialog" rel="roleinfoedit" mask="true" maxable="false" fresh="true">修改</a>
								&nbsp;&nbsp;
							<s:if test="1 == isvalid">
								<a  class="delete" href="./updateSysRoleFlag?roleid=<s:property value="roleid"/>&action=edit&valid=0"  title="确定要作废吗?" target="ajaxTodo" refresh="true">作废</a>
							</s:if>
							<s:if test="0 == isvalid">
								<a  class="delete" href="./updateSysRoleFlag?roleid=<s:property value="roleid"/>&action=edit&valid=1"  title="确定要恢复吗?" target="ajaxTodo" refresh="true">恢复</a>
							</s:if>
							&nbsp;&nbsp;<a href="./rolefunc.jsp?roleid=<s:property value="roleid"/>" target="ajax" rel="roleinforight">功能列表</a></td>
						</tr>
					</s:iterator>
				</tbody>
			</table>
			<div class="panelBar">
		        <div class="pages">
		            <span>显示</span>
		            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
		                <option value="10" <s:if test="10 == #session.numPerPage">selected="selected"</s:if>>10</option>
		                <option value="20" <s:if test="20 == #session.numPerPage">selected="selected"</s:if>>20</option>
		                <option  value="50"  <s:if test="50 == #session.numPerPage">selected="selected"</s:if>>50</option>
		                <option  value="100"  <s:if test="100 == #session.numPerPage">selected="selected"</s:if>>100</option>
		            </select>
		            <span>条，共<%=dwzData.totalCount%>条</span>
		        </div>
		        <div class="pagination" targetType="navTab" totalCount= "<%=dwzData.totalCount%>" numPerPage="<%=dwzData.numPerPage%>" pageNumShown="<%=dwzData.pageNumShown%>" currentPage="<%=dwzData.currentPage%>" ></div>
		    </div>
		</div>
</div>
<div id="roleinforight" class="unitBox" style="margin-left:703px;border-left:1px #B8D0D6 solid;">
	<div class="pageHeader">
		    <form id="pagerForm" rel="pagerForm" onsubmit="return navTabSearch(this);" action="webQueryAllSysRole" method="post">
		        <input type="hidden" name="pageNum" value="<%=dwzData.currentPage%>" />
		        <input type="hidden" name="numPerPage" value="<%=dwzData.numPerPage%>" />  
		        <input type="hidden" name="method" value="page" />
		        <div class="searchBar">
		            <table class="searchContent">
						<tr>
							<td></td>
						</tr>
					</table>
		        </div>
		    </form>
		</div>
		<div class="pageContent">
			<div class="panelBar">
		        <ul class="toolBar">
		            <li class="line"></li> 
		            <li><a class="add" ><span>角色功能列表:</span></a></li>
		        </ul>
		    </div>
		    <table class="table" layoutH="118">
				<thead>
					<tr>
					<!-- 	<th width="40">序号</th>
						<th width="60">功能编号</th>  -->
						<th width="260">功能名称</th>
						<th width="160">数据权限</th>
					</tr>
				</thead>
				<tbody id="functbody">
				
				</tbody>
			</table>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
			</ul>
		</div>
	</div>
</div>
<script type="text/javascript">
		$("body").ready(function(){
			if(canWriteData('func00202')!=1)
			{
				$('.add').hide();
				$('.edit').hide();
				$('.delete').hide();
			}
		});
</script>
</div>